package com.zhou.org.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhou.org.dao.Right;
import com.zhou.org.dto.RightClearSelfDto;
import com.zhou.org.dto.RightPageDto;
import com.zhou.org.dto.RightQueryDto;
import com.zhou.org.model.RightSaveBean;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lang.zhou
 * @since 2022-08-23
 */
public interface RightService extends IService<Right> {
    List<String> getDistinctRightKey();
    List<RightPageDto> getRight(RightQueryDto dto);

    void saveRights(Right right,List<Integer> orgList);
    void deleteRights(Collection<Integer> ids);

    void deleteRight(String rightKey,String objectKey);
    void deleteRight(String rightKey,String objectKey,int orgId);
    void deleteRight(String rightKey, Collection<String> objectKeys);
    List<Right> getRightBy(String rightKey,String rightType,List<Integer> orgIds);
    List<Right> getRightBy(String rightKey,String rightType,int orgId);

    Map<String,Right> getRightMapBy(String rightKey, String rightType, int orgId);
    void clearSelfRight(String rightKey, List<String> rightTypes, int orgId);
    void clearSelfRight(String rightKey,String rightType,int orgId);
    void clearSelfRight(List<RightClearSelfDto> list);
    void saveRight(List<RightSaveBean> beans);
    void saveRight(int orgId,String rightKey,Map<String,List<Right>[]> rights);
}
